package com.cskaoyan.mapper;

import com.cskaoyan.bean.po.MarketAddress;
import com.cskaoyan.bean.po.MarketCart;
import com.cskaoyan.bean.po.MarketCartExample;
import com.cskaoyan.bean.vo.wx.WxCartCheckedBo;
import org.apache.ibatis.annotations.Param;

import java.util.ArrayList;
import java.util.List;

public interface MarketCartMapper {
    long countByExample(MarketCartExample example);

    int deleteByExample(MarketCartExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(MarketCart record);

    int insertSelective(MarketCart record);

    List<MarketCart> selectByExample(MarketCartExample example);

    MarketCart selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") MarketCart record, @Param("example") MarketCartExample example);

    int updateByExample(@Param("record") MarketCart record, @Param("example") MarketCartExample example);

    int updateByPrimaryKeySelective(MarketCart record);

    int updateByPrimaryKey(MarketCart record);

    ArrayList<MarketCart> selectCartAll();

    int updateChecked(@Param("productId") String productId, @Param("b") boolean b);

    int update(@Param("marketCart") MarketCart marketCart);

    MarketCart selectByIdAndgoodsId(@Param("id") Integer id, @Param("goodsId") Integer goodsId);

    int updateNumber(@Param("id") Integer id, @Param("num") int num);

    Integer selectByUserId(int id);

    int deleteByUserId(@Param("userId") Integer userId, @Param("productId") String productId);

    ArrayList<MarketCart> selectByIdAndCheck(@Param("userId") Integer userId);

    MarketAddress selectMarketAddress(Integer addressId);

    ArrayList<MarketCart> selectByCartId(Integer cartId);

    ArrayList<MarketCart> selectCartById(Integer userId);

    ArrayList<MarketCart> selectByCheck(Short check);
}